﻿using Magicodes.ExporterAndImporter.Core;
using Magicodes.ExporterAndImporter.Excel;
using SqlSugar;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Text;

namespace NP.BPMReportPlatform.SystemSettings.Dto
{
    /// <summary>
    /// 字典表 批量导入
    /// IsLabelingError：是否标注数据错误
    /// </summary>
    [ExcelImporter(IsLabelingError = true, SheetName = "字典表")]
    public class ImportKeyValuesTemplate
    {
        /// <summary>
        /// 编码
        /// </summary>
        [ImporterHeader(Name = "编码")]
        [Required(ErrorMessage = "编码不能为空")]
        public string Code { get; set; }

        /// <summary>
        /// 值
        /// </summary>
        [ImporterHeader(Name = "值")]
        [Required(ErrorMessage = "值不能为空")]
        public string Name { get; set; }

        /// <summary>
        /// 父级编码
        /// </summary>
        [ImporterHeader(Name = "父级编码")]
        public string ParentCode { get; set; }

        /// <summary>
        /// 分类编码
        /// </summary>
        [ImporterHeader(Name = "分类编码")]
        [Required(ErrorMessage = "分类编码不能为空")]
        public string CatalogCode { get; set; }

        /// <summary>
        /// 分类描述
        /// </summary>
        [ImporterHeader(Name = "分类描述")]
        public string CatalogName { get; set; }

        /// <summary>
        /// 排序
        /// </summary>
        [ImporterHeader(Name = "排序")]
        public string Sort { get; set; }

        /// <summary>
        /// 备注
        /// </summary>
        [ImporterHeader(Name = "备注")]
        public string Remark { get; set; }
    } 
}
